package cn.stylefeng.guns.modular.tool.controller;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.io.IOUtils;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.core.util.DateUtil;
import cn.stylefeng.guns.modular.tool.entity.ToolExpressReconciliationYz;
import cn.stylefeng.guns.modular.tool.model.params.ToolExpressReconciliationFwParam;
import cn.stylefeng.guns.modular.tool.model.params.ToolExpressReconciliationRfParam;
import cn.stylefeng.guns.modular.tool.model.params.ToolExpressReconciliationStParam;
import cn.stylefeng.guns.modular.tool.model.params.ToolExpressReconciliationYzParam;
import cn.stylefeng.guns.modular.tool.model.params.ToolExpressReconciliationZtParam;
import cn.stylefeng.guns.modular.tool.model.result.ToolExpressReconciliationYzResult;
import cn.stylefeng.guns.modular.tool.model.result.orderCount;
import cn.stylefeng.guns.modular.tool.service.ToolExpressReconciliationFwService;
import cn.stylefeng.guns.modular.tool.service.ToolExpressReconciliationRfService;
import cn.stylefeng.guns.modular.tool.service.ToolExpressReconciliationStService;
import cn.stylefeng.guns.modular.tool.service.ToolExpressReconciliationYzService;
import cn.stylefeng.guns.modular.tool.service.ToolExpressReconciliationZtService;
import cn.stylefeng.guns.sys.modular.system.entity.User;
import cn.stylefeng.guns.sys.modular.system.service.UserService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import cn.stylefeng.roses.core.util.ToolUtil;


/**
 * 邮政对账管理控制器
 *
 * @author zhucx
 * @Date 2022-12-14 16:39:56
 */
@Controller
@RequestMapping("/toolExpressReconciliationYz")
public class ToolExpressReconciliationYzController extends BaseController {

    private String PREFIX = "/tool/toolExpressReconciliationYz";

    @Autowired
    private ToolExpressReconciliationYzService toolExpressReconciliationYzService;

    @Autowired
    private ToolExpressReconciliationFwService toolExpressReconciliationFwService;

    @Autowired
    private ToolExpressReconciliationZtService toolExpressReconciliationZtService;

    @Autowired
    private ToolExpressReconciliationStService toolExpressReconciliationStService;

    @Autowired
    private UserService userService;
    
    /**
     * 跳转到对账订单统计
     */
    @RequestMapping("orderCount")
    public String orderCount() {
        return PREFIX + "/orderCount.html";
    }

    /**
     * 查询对账订单统计 列表
     */
    @ResponseBody
    @RequestMapping("/findorderCount")
    public LayuiPageInfo findorderCount(String month) {
    	List<orderCount> reslist = new ArrayList<orderCount>();
    	User user = userService.getcurrentUser();
    	if (ToolUtil.isEmpty(month)) {
    		month = DateUtil.getMonth();
		} 
    	
    	ToolExpressReconciliationYzParam yzParam = new ToolExpressReconciliationYzParam();
    	yzParam.setReconciliationMonth(month);
    	yzParam.setDeptId(user.getDeptId());
    	List<orderCount> yzlist = toolExpressReconciliationYzService.findorderCount(yzParam,user.getOperateId());//邮政合计	单量、运费（纯运费不含附加费）
    	for (orderCount r : yzlist) {
    		orderCount count = new orderCount();
    		count.setProvince(r.getProvince());
    		List<orderCount> list = new ArrayList<orderCount>();
    		list.add(r);
    		count.setList(list);
    		reslist.add(count);
		}
    	
    	ToolExpressReconciliationFwParam fwParam = new ToolExpressReconciliationFwParam();
    	fwParam.setReconciliationMonth(month);
    	fwParam.setDeptId(user.getDeptId());
    	List<orderCount> fwlist = toolExpressReconciliationFwService.findorderCount(fwParam,user.getOperateId());//丰网合计
    	for (orderCount r : fwlist) {
    		boolean flag = false;
			for (orderCount r2 : reslist) {
				if(r.getProvince().equals(r2.getProvince())) {
					flag = true;
					List<orderCount> list = r2.getList();
					list.add(r);
					r2.setList(list);
					break;
				}
			}
			if(!flag) {
	    		orderCount count = new orderCount();
	    		count.setProvince(r.getProvince());
	    		List<orderCount> list = new ArrayList<orderCount>();
	    		list.add(r);
	    		count.setList(list);
	    		reslist.add(count);
			}
		}
    	
    	ToolExpressReconciliationZtParam ztParam = new ToolExpressReconciliationZtParam();
    	ztParam.setReconciliationMonth(month);
    	ztParam.setDeptId(user.getDeptId());
    	List<orderCount> ztlist = toolExpressReconciliationZtService.findorderCount(ztParam,user.getOperateId());//中通合计
    	for (orderCount r : ztlist) {
    		boolean flag = false;
			for (orderCount r2 : reslist) {
				if(r.getProvince().equals(r2.getProvince())) {
					flag = true;
					List<orderCount> list = r2.getList();
					list.add(r);
					r2.setList(list);
					break;
				}
			}
			if(!flag) {
	    		orderCount count = new orderCount();
	    		count.setProvince(r.getProvince());
	    		List<orderCount> list = new ArrayList<orderCount>();
	    		list.add(r);
	    		count.setList(list);
	    		reslist.add(count);
			}
		}
    	
    	ToolExpressReconciliationStParam stParam = new ToolExpressReconciliationStParam();
    	stParam.setReconciliationMonth(month);
    	stParam.setDeptId(user.getDeptId());
    	List<orderCount> stlist = toolExpressReconciliationStService.findorderCount(stParam,user.getOperateId());//申通合计
    	for (orderCount r : stlist) {
    		boolean flag = false;
			for (orderCount r2 : reslist) {
				if(r.getProvince().equals(r2.getProvince())) {
					flag = true;
					List<orderCount> list = r2.getList();
					list.add(r);
					r2.setList(list);
					break;
				}
			}
			if(!flag) {
	    		orderCount count = new orderCount();
	    		count.setProvince(r.getProvince());
	    		List<orderCount> list = new ArrayList<orderCount>();
	    		list.add(r);
	    		count.setList(list);
	    		reslist.add(count);
			}
		}

    	BigDecimal as = new BigDecimal("0");
    	List<orderCount> reslist2 = new ArrayList<orderCount>();
    	for (orderCount r : reslist) {
        	BigDecimal num05sum = new BigDecimal("0");
        	BigDecimal num51sum = new BigDecimal("0");
        	BigDecimal num01sum = new BigDecimal("0");
        	BigDecimal num12sum = new BigDecimal("0");
        	BigDecimal num23sum = new BigDecimal("0");
        	BigDecimal num34sum = new BigDecimal("0");
        	BigDecimal num45sum = new BigDecimal("0");
        	BigDecimal num5sum = new BigDecimal("0");

        	BigDecimal money05sum = new BigDecimal("0");
        	BigDecimal money51sum = new BigDecimal("0");
        	BigDecimal money01sum = new BigDecimal("0");
        	BigDecimal money12sum = new BigDecimal("0");
        	BigDecimal money23sum = new BigDecimal("0");
        	BigDecimal money34sum = new BigDecimal("0");
        	BigDecimal money45sum = new BigDecimal("0");
        	BigDecimal money5sum = new BigDecimal("0");
    		for (orderCount r2 : r.getList()) {
    			BigDecimal qj05gNum = new BigDecimal(r2.getQj05gNum());
    			num05sum = num05sum.add(qj05gNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj05gMoney = new BigDecimal(r2.getQj05gMoney());
    			money05sum = money05sum.add(qj05gMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj05gMoney.compareTo(as) == 1) {
    				BigDecimal qj05gCost = qj05gMoney.divide(qj05gNum, 2, BigDecimal.ROUND_HALF_DOWN);
    				r2.setQj05gCost(qj05gCost.toString());
    			} else {
    				r2.setQj05gCost("0");
    			}
    			
    			BigDecimal qj51kgNum = new BigDecimal(r2.getQj51kgNum());
    			num51sum = num51sum.add(qj51kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj51kgMoney = new BigDecimal(r2.getQj51kgMoney());
    			money51sum = money51sum.add(qj51kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj51kgMoney.compareTo(as) == 1) {
        			BigDecimal qj51kgCost = qj51kgMoney.divide(qj51kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj51kgCost(qj51kgCost.toString());
    			} else {
    				r2.setQj51kgCost("0");
    			}
    			
    			BigDecimal qj01kgNum = qj05gNum.add(qj51kgNum);
    			num01sum = num01sum.add(qj01kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj01kgMoney = qj05gMoney.add(qj51kgMoney);
    			money01sum = money01sum.add(qj01kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj01kgMoney.compareTo(as) == 1) {
        			BigDecimal qj01kgCost = qj01kgMoney.divide(qj01kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj01kgCost(qj01kgCost.toString());
    			} else {
    				r2.setQj01kgCost("0");
    			}
    			
    			BigDecimal qj12kgNum = new BigDecimal(r2.getQj12kgNum());
    			num12sum = num12sum.add(qj12kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj12kgMoney = new BigDecimal(r2.getQj12kgMoney());
    			money12sum = money12sum.add(qj12kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj12kgMoney.compareTo(as) == 1) {
        			BigDecimal qj12kgCost = qj12kgMoney.divide(qj12kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj12kgCost(qj12kgCost.toString());
    			} else {
    				r2.setQj12kgCost("0");
    			}
    			
    			BigDecimal qj23kgNum = new BigDecimal(r2.getQj23kgNum());
    			num23sum = num23sum.add(qj23kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj23kgMoney = new BigDecimal(r2.getQj23kgMoney());
    			money23sum = money23sum.add(qj23kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj23kgMoney.compareTo(as) == 1) {
        			BigDecimal qj23kgCost = qj23kgMoney.divide(qj23kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj23kgCost(qj23kgCost.toString());
    			} else {
    				r2.setQj23kgCost("0");
    			}
    			
    			BigDecimal qj34kgNum = new BigDecimal(r2.getQj34kgNum());
    			num34sum = num34sum.add(qj34kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj34kgMoney = new BigDecimal(r2.getQj34kgMoney());
    			money34sum = money34sum.add(qj34kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj34kgMoney.compareTo(as) == 1) {
        			BigDecimal qj34kgCost = qj34kgMoney.divide(qj34kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj34kgCost(qj34kgCost.toString());
    			} else {
    				r2.setQj34kgCost("0");
    			}
    			
    			BigDecimal qj45kgNum = new BigDecimal(r2.getQj45kgNum());
    			num45sum = num45sum.add(qj45kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj45kgMoney = new BigDecimal(r2.getQj45kgMoney());
    			money45sum = money45sum.add(qj45kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj45kgMoney.compareTo(as) == 1) {
        			BigDecimal qj45kgCost = qj45kgMoney.divide(qj45kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj45kgCost(qj45kgCost.toString());
    			} else {
    				r2.setQj45kgCost("0");
    			}
    			
    			BigDecimal qj5kgNum = new BigDecimal(r2.getQj5kgNum());
    			num5sum = num5sum.add(qj5kgNum).setScale(2, BigDecimal.ROUND_HALF_UP);
    			BigDecimal qj5kgMoney = new BigDecimal(r2.getQj5kgMoney());
    			money5sum = money5sum.add(qj5kgMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
    			if(qj5kgMoney.compareTo(as) == 1) {
        			BigDecimal qj5kgCost = qj5kgMoney.divide(qj5kgNum, 2, BigDecimal.ROUND_HALF_DOWN);
        			r2.setQj5kgCost(qj5kgCost.toString());
    			} else {
    				r2.setQj5kgCost("0");
    			}
    			
    			reslist2.add(r2);
			}
    		orderCount r3 = new orderCount();
    		r3.setProvince(r.getProvince());
    		r3.setExpressName("合计");
    		
    		r3.setQj05gNum(num05sum.toString());
    		r3.setQj51kgNum(num51sum.toString());
    		r3.setQj12kgNum(num12sum.toString());
    		r3.setQj23kgNum(num23sum.toString());
    		r3.setQj34kgNum(num34sum.toString());
    		r3.setQj45kgNum(num45sum.toString());
    		r3.setQj5kgNum(num5sum.toString());
    		
    		r3.setQj05gMoney(money05sum.toString());
    		r3.setQj51kgMoney(money51sum.toString());
    		r3.setQj12kgMoney(money12sum.toString());
    		r3.setQj23kgMoney(money23sum.toString());
    		r3.setQj34kgMoney(money34sum.toString());
    		r3.setQj45kgMoney(money45sum.toString());
    		r3.setQj5kgMoney(money5sum.toString());
    		
			if(money05sum.compareTo(as) == 1) {
	    		BigDecimal qj05gCost = money05sum.divide(num05sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj05gCost(qj05gCost.toString());
			} else {
				r3.setQj05gCost("0");
			}
    		
			if(money51sum.compareTo(as) == 1) {
	    		BigDecimal qj51kgCost = money51sum.divide(num51sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj51kgCost(qj51kgCost.toString());
			} else {
				r3.setQj51kgCost("0");
			}
    		
			if(money01sum.compareTo(as) == 1) {
	    		BigDecimal qj01kgCost = money01sum.divide(num01sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj01kgCost(qj01kgCost.toString());
			} else {
				r3.setQj01kgCost("0");
			}
    		
			if(money12sum.compareTo(as) == 1) {
	    		BigDecimal qj12kgCost = money12sum.divide(num12sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj12kgCost(qj12kgCost.toString());
			} else {
				r3.setQj12kgCost("0");
			}
    		
			if(money23sum.compareTo(as) == 1) {
	    		BigDecimal qj23kgCost = money23sum.divide(num23sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj23kgCost(qj23kgCost.toString());
			} else {
				r3.setQj23kgCost("0");
			}
    		
			if(money34sum.compareTo(as) == 1) {
	    		BigDecimal qj34kgCost = money34sum.divide(num34sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj34kgCost(qj34kgCost.toString());
			} else {
				r3.setQj34kgCost("0");
			}
    		
			if(money45sum.compareTo(as) == 1) {
	    		BigDecimal qj45kgCost = money45sum.divide(num45sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj45kgCost(qj45kgCost.toString());
			} else {
				r3.setQj45kgCost("0");
			}
    		
			if(money5sum.compareTo(as) == 1) {
	    		BigDecimal qj5kgCost = money5sum.divide(num5sum, 2, BigDecimal.ROUND_HALF_DOWN);
	    		r3.setQj5kgCost(qj5kgCost.toString());
			} else {
				r3.setQj5kgCost("0");
			}
    		
    		reslist2.add(r3);
		}

    	LayuiPageInfo layuiPageInfo = new LayuiPageInfo();
    	layuiPageInfo.setData(reslist2);
    	layuiPageInfo.setCount(reslist2.size());
        return layuiPageInfo;
    }

    /**
     * 跳转到主页面
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "/toolExpressReconciliationYz.html";
    }
    
    /**
     * 跳转到导入 	邮政对账	页面
     */
    @RequestMapping("toimportExcel2")
    public String toimportExcel2() {
        return PREFIX + "/import.html";
    }
    
    /**
     * 快递明细
     * 上传excel   
     */
	@RequestMapping(value = "/importExceNewmethodl" , method = {RequestMethod.POST} )
    @ResponseBody
    public ResponseData importExceNewmethodl(@RequestPart("file") MultipartFile file,Long reconciliationId)  {
		ResponseData data = new ResponseData();
		try {
			data = toolExpressReconciliationYzService.getExceldata(file,reconciliationId,data);//处理导入数据
		} catch (Exception e) {
			e.printStackTrace();
		} 
        return data;
    }
    
    /**
     * 下载订单模板
     * @throws ServletException , IOException
     */
    @RequestMapping("downloadExcelTemplate")
    public void downloadExcelTemplate(HttpServletRequest request,HttpServletResponse response) throws ServletException ,IOException {
        String path = "assets/excel/toolExpressReconciliationYz.xlsx";
        try {
            InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(path);
            OutputStream  outputStream = response.getOutputStream();
            //设置下载的文件类型
            response.setContentType("application/vnd.ms-excel;charset=utf-8");
            //设置下载文件名
            response.setHeader("Content-Disposition", "attachment;filename=" + new String(("邮政对账导入模板" + ".xlsx").getBytes(), "iso-8859-1"));
            IOUtils.copy(inputStream, outputStream);
            outputStream.flush();
            inputStream.close();
            outputStream.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    /**
     * 导出邮政核对账单Excel
     */
    @RequestMapping("/exportToExcel")
    public void exportToExcel(HttpServletResponse response,Long reconciliationId) throws IOException {
        Workbook wb = toolExpressReconciliationYzService.exportToExcel(reconciliationId);
        OutputStream output = response.getOutputStream();
        response.setContentType("application/vnd.ms-excel;charset=utf-8");
        response.setHeader("Content-Disposition", "attachment;filename=" + new String(("邮政核对账单" + ".xlsx").getBytes(), "iso-8859-1"));
        wb.write(output);
        output.close();
    }

    /**
     * 新增页面
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/add")
    public String add() {
        return PREFIX + "/toolExpressReconciliationYz_add.html";
    }

    /**
     * 编辑页面
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/edit")
    public String edit() {
        return PREFIX + "/toolExpressReconciliationYz_edit.html";
    }

    /**
     * 新增接口
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/addItem")
    @ResponseBody
    public ResponseData addItem(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam) {
    	User user = userService.getcurrentUser();
    	toolExpressReconciliationYzParam.setDeptId(user.getDeptId());
    	toolExpressReconciliationYzParam.setDeliverId(user.getDeliverId());
    	toolExpressReconciliationYzParam.setCreateUserName(user.getName());
        this.toolExpressReconciliationYzService.add(toolExpressReconciliationYzParam);
        return ResponseData.success();
    }

    /**
     * 编辑接口
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/editItem")
    @ResponseBody
    public ResponseData editItem(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam) {
        this.toolExpressReconciliationYzService.update(toolExpressReconciliationYzParam);
        return ResponseData.success();
    }

    @Autowired
    private ToolExpressReconciliationRfService toolExpressReconciliationRfService;

    /**
     * 删除接口
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/delete")
    @ResponseBody
    public ResponseData delete(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam) {
        this.toolExpressReconciliationYzService.delete(toolExpressReconciliationYzParam);
        
        ToolExpressReconciliationYzParam toolExpressReconciliationYzParam2 = new ToolExpressReconciliationYzParam();
        toolExpressReconciliationYzParam2.setReconciliationId(Long.parseLong(toolExpressReconciliationYzParam.getId().toString()));
		this.toolExpressReconciliationYzService.deleteBySpec(toolExpressReconciliationYzParam2);
		
		ToolExpressReconciliationRfParam toolExpressReconciliationRfParam = new ToolExpressReconciliationRfParam();
		toolExpressReconciliationRfParam.setV1("yz");
		toolExpressReconciliationRfParam.setReconciliationId(Long.parseLong(toolExpressReconciliationYzParam.getId().toString()));
		this.toolExpressReconciliationRfService.deleteBySpec(toolExpressReconciliationRfParam);
        return ResponseData.success();
    }

    /**
     * 删除接口
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/btnRevoke2")
    @ResponseBody
    public ResponseData btnRevoke2(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam) {
		this.toolExpressReconciliationYzService.deleteBySpec(toolExpressReconciliationYzParam);
        return ResponseData.success();
    }

    /**
     * 删除接口
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/btnDelete2")
    @ResponseBody
    public ResponseData btnDelete2(Integer[] ids) {
    	for (Integer id : ids) {
    		ToolExpressReconciliationYzParam toolExpressReconciliationYzParam = new ToolExpressReconciliationYzParam();
    		toolExpressReconciliationYzParam.setId(id);
    		this.toolExpressReconciliationYzService.delete(toolExpressReconciliationYzParam);
		}
        return ResponseData.success();
    }

    /**
     * 查看详情接口
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @RequestMapping("/detail")
    @ResponseBody
    public ResponseData detail(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam) {
        ToolExpressReconciliationYz detail = this.toolExpressReconciliationYzService.getById(toolExpressReconciliationYzParam.getId());
        return ResponseData.success(detail);
    }

    /**
     * 查询列表
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @ResponseBody
    @RequestMapping("/list")
    public LayuiPageInfo list(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam,String condition ) {
    	User user = userService.getcurrentUser();
    	toolExpressReconciliationYzParam.setDeptId(user.getDeptId());
        return this.toolExpressReconciliationYzService.findPageBySpec(toolExpressReconciliationYzParam,condition,user.getOperateId());
    }

    /**
     * 查询邮政快递对账列表
     *
     * @author zhucx
     * @Date 2022-12-14
     */
    @ResponseBody
    @RequestMapping("/list2")
    public LayuiPageInfo list2(ToolExpressReconciliationYzParam toolExpressReconciliationYzParam,String condition ) {
        return this.toolExpressReconciliationYzService.findPageBySpecYzDz(toolExpressReconciliationYzParam,condition);
    }

}


